package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.UserSalvageEventsRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.TicketRecordsVO;
import com.sc.nft.entity.vo.UserSalvageEventsRecordsVO;
import com.sc.nft.entity.vo.salvageEvents.AdminPageSalvageEventsRecordsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户分解活动记录表(sc_user_salvage_events_records)数据Mapper
 *
 * @author Sun
 * @since 2023-08-10 13:41:10
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface UserSalvageEventsRecordsMapper extends BaseMapper<UserSalvageEventsRecords> {

    /**
     * 用户分解活动记录表(sc_user_salvage_events_records)数据Mapper
     * @param page
     * @param userId
     * @return
     */
    Page<UserSalvageEventsRecordsVO> userSalvageEventsRecords(Page page,@Param("userId") Long userId);

    /**
     * 分页获取分解记录
     * @param page
     * @param userTel
     * @return
     */
    Page<AdminPageSalvageEventsRecordsVO> gtPageSalvageEventsRecords(Page page, @Param("userTel") String userTel,@Param("eventsName") String eventsName);

    Integer getSumCountById(@Param("eventsId") Long eventsId);

    Integer getCountByUserIdAndEventsId(@Param("userId") Long userId, @Param("eventsId") Long eventsId);

    /**
     * 获取门票的记录
     * @param page
     * @param userId
     * @return
     */
    Page<TicketRecordsVO> getTicketRecords(Page page, @Param("userId") Long userId);
}
